<?php ob_start();
require('includes/connect.php');
    	$faq_id = $_POST["faq_id"];
    	$faq = addslashes($_POST["faq"]);
		$answer = $_POST["ans_id"];
		$answer1 = $_POST["answer"];

$sql="Update faq set `faq`='$faq' where faq_id=".$faq_id;
$result=mysql_query($sql);

$sql1="Update answers set `answers`='$answer1' where faq_id=".$faq_id;
$result1=mysql_query($sql1);

		
		if($result)
						{
	
					header("location:view_faq.php");
 
		}
	
	elseif($result1)
						{
	
					header("location:view_faq.php");
 
		}
	else {
		//header("location:edituser.php");
		echo mysql_error();
	}
	
ob_flush();	?>
